/*
 * @Author: WangRui
 * @Date: 2019-12-07 13:36:40
 * @LastEditors: WangRui
 * @LastEditTime: 2019-12-07 14:40:40
 * @Description: file content
 */
import actionTypes from './actionTypes'
import { fromJS } from 'immutable'

const defaultState = fromJS({
    isLogin: false
})

export default (state = defaultState, action) => {
    switch (action.type) {
        case actionTypes.SET_LOGIN_STATE:
            return state.set('isLogin', fromJS(action.data))
        default:
            return state
    }
}